<?php
class baseModel extends model{

	//提示
    public function msg($message,$status=1,$ajax=false) {
    	if($status){
    		$status='y';
    	}else{
    		$status='n';
    	}
        if (is_ajax()||$ajax){
            @header("Content-type:text/html");
            echo json_encode(array('status' => $status, 'info' => $message));
            exit;
        }else{
            @header("Content-type: text/html; charset=utf-8"); 
            echo "<script>alert('".$message."'); history.go(-1);</script>";
            exit;
        } 
    }

}